<div id="content">
	<div id="job_history">
		<?php __('Recent viewed jobs:');?>
		<ul>
		</ul>
	</div>
	<div class="content">
		<div id="jobs">
		<?php
		$i = 0;
		foreach ($categories as $category):
		$cata_class = null;
		$cata_class = 'category_'.$category['Category']['name'];
		?>
			<div class="<?php echo $cata_class; ?>">
				<div class="category">
					<div class="feed">
						<a href="/en/category/design.atom">Feed</a>
					</div>
					<h1>
						<a href="<?php echo $this->webroot ?>jobs/?category=<?php echo $category['Category']['id']; ?>"><?php echo $category['Category']['name']; ?>
						</a>
					</h1>
				</div>
				<table class="jobs">
					<tbody>
					<?php
					$i = 0;
					foreach ($category['Job'] as $job):
					$class = null;
					if ($i++ % 2 == 0) {
						$class = ' class="even"';
					}else{
						$class = ' class="odd"';
					}
					if($i>4) break;
					?>
						<tr <?php echo $class;?>>
							<td class="location"><?php echo $job['name']; ?>&nbsp;</td>
							<td class="position"><?php echo $this->Html->link($job['position'], array('controller' => 'Jobs', 'action' => 'view', $job['id'])); ?>
							</td>
							<td class="company"><?php echo $job['company']; ?></td>
						</tr>
						<?php endforeach; ?>
					</tbody>
				</table>
				<?php if (sizeof($category['Job'])>2) : ?>
				<div class="more_jobs">
					<a
						href="<?php echo $this->webroot ?>jobs/?category=<?php echo $category['Category']['id'];?>"><?php __('more');?></a>
				</div>
				<?php endif ?>
			</div>
			<?php endforeach; ?>
		</div>
	</div>
</div>
